unit UArquivoDeConfiguracao;

interface

uses IniFiles;

type
  TArquivoDeConfiguracao = class(TObject)

    private
      arquivoIni : TIniFile;

    public
      constructor Create; Overload;
      destructor Destroy; Overload;
      class function obterChave(secao : String; chave : String) : String;

end;

implementation

constructor TArquivoDeConfiguracao.Create;
begin
  inherited;
  //  if (self.arquivoIni = nil) then
  //    self.arquivoIni := TIniFile.Create('Config\Conpare.ini');
end;

destructor TArquivoDeConfiguracao.Destroy;
begin
  //  self.arquivoIni.Destroy;
  inherited;
end;

class function TArquivoDeConfiguracao.obterChave(secao : String; chave : String) : String;
var
  arquivoIni : TIniFile;
begin
  arquivoIni := TIniFile.Create('Config\Conpare.ini');
  result := arquivoIni.ReadString(secao, chave, 'C:\Conpare.GDB');
end;

end.
 